<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>购物车页面</title>
  <link rel="stylesheet" href="/css/shopping.css">
</head>

<body>
  <header></header>
  <div class="shop" id="shopping_car"></div>

  <script type="text/html" id="srcShop">
      <ul class="title">
          <li>
            <input type="checkbox" id="all-check">全选</li>
          <li>商品信息</li>
          <li>单价</li>
          <li>数量</li>
          <li>合计</li>
          <li>操作</li>
      </ul>
      {{each cartList shop}}
      <ul class="main" data-id="{{shop.id}}">
          <li>
            <input type="checkbox" {{shop.check ? 'checked' : ''}}>
          </li>
          <li>
            <a href="/html/detail.html?id={{shop.id}}">
              <img src="{{shop.photo.url}}" alt="">
            </a>
           
            <p>{{shop.title}}</p>
          </li>
          <li>￥
            <span>{{shop.price.toFixed(2)}}</span>
          </li>
          <li>
            <a href="javascript:;" class="sub" id="sub">-</a>
            <input type="text"  class="modify"    value="{{shop.num}}">
            <a href="javascript:;" class="add" id="add">+</a>
          </li>
          <li>
            ￥
            <span id="count">{{(shop.price*shop.num).toFixed(2)}}</span>
          </li>
          <li>
            <b id="dele">删除</b>
          </li>
      </ul>
      {{/each}}
      <ul class="settlement">
          <li>
            <a href="javascript:;"><button id="overbooking">下单结算</button></a>
            
          </li>
          <li>合计： ￥
            <span id="payMoney"></span>
          </li>
        </ul>
      
    </script>




  <div class="empty" id="cart-empty">
    <img src="/images/empty.jpg" alt="">
    <p>您的购物车还是空的，赶快行动吧！</p>
    <a href="/index.html">去首页</a>
  </div>
  <footer></footer>
  <script src="/libs/jquery/require/require.min.js" data-main="/js/shopping"></script>
</body>

</html>